import json

str = '{"name":"haha", "age": 19}'
str1 = '[{"name":"haha", "age": 19},{"name":"haha1", "age": 29}]'

student = json.loads(str)
student1 = json.loads(str1)

print(type(student))
for key in student:
    print(key)
    print(student[key])

print(type(student1))

json_str = json.dumps(student)

print(type(json_str))
print(json_str)